import React from 'react';

import { BrowserRouter, HashRouter} from 'react-router-dom';

import App from './App.js';

import {Provider} from 'react-redux';

import Store from './store/store.js';

// console.log(Store.getState())
const unsubscribe = Store.subscribe(() =>{
  // console.log(Store.getState())
  localStorage.setItem("ljmRoot", JSON.stringify(Store.getState()));
})
// 停止监听 state 更新
// unsubscribe();
const Router = () => (
    <BrowserRouter>
        <Provider store={Store}>
            <App/>
        </Provider>
    </BrowserRouter>
)
export default Router;
